<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="ctx/ctx.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>建造师继续教育选修听课考试</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
  </head>
  <body>
  	<center>
  		<a href="${ctx }/index" style="padding-right: 30px">八大员</a>
  		<a href="${ctx }/bixiu" style="padding-right: 30px">必修</a>
	  	<a href="${ctx }/anguan" style="padding-right: 30px">安管</a>
  	</center>
  	<center><h3>建造师继续教育选修听课考试</h3></center>
    <form action="listenxuan" name="lgoin" id="listenxuan" method="post">
    	<table align="center" border="0">
    		<tr height="40px">
    			<td align="right" width="120px;">用户名：</td>
    			<td><input type="text" name="txtUserName"></td>
    		</tr>
    		<tr>
    			<td align="right" width="120px;"> 密码：</td>
    			<td> <input type="password" name="txtPwd" value="888888"></td>
    		</tr>
    		<tr height="40px">
    			<td align="right" width="120px;">专业类型：</td>
    			<td>
    			<select name="ZY">
    				<option value="0">一级建造师建筑工程选修</option>
    				<option value="1" selected="selected">二级建造师选修</option>
    			</select> </td>
    		</tr>
    		<tr height="40px">
    			<td align="right" width="120px;">节数：</td>
    			<td><input type="text" name="num1" id="num1" value="1" size="5">—<input type="text" name="num2" id="num2" value="59" size="5">
    			</td>
    		</tr>
    		<tr height="50px">
    			<td colspan="2" align="center">
    				<input type="button" value="只听课" id="btn" onclick="toLogin(1)">
    				<input type="button" value="听课并考试" id="btn" onclick="toLogin(2)">
    				<input type="button" value="只考试" id="btn" onclick="toLogin(3)">
    				<input type="hidden" name="flag" id="flag">
    			</td>
    		</tr>
    	</table>
    </form>
    <script type="text/javascript">
    function toLogin(flag){
    	var num1 = document.getElementById("num1").value;
    	var num2 = document.getElementById("num2").value;
    	document.getElementById("flag").value=flag;
    	if(parseInt(num2) > 60 || parseInt(num1) > 60 
    			|| parseInt(num2) < 1 || parseInt(num1) < 1){
    		alert("课程节数不能大于60或小于1");
    	}
    	if(parseInt(num2) < parseInt(num1)){
    		alert("听课结束课数不能小于开始课数!");
    		return ;
    	}
    	document.getElementById('listenxuan').submit();
    }
   	 
    </script>
  </body>
</html>
